<script lang="ts" setup>
defineProps<{ data: IPost }>();
</script>

<template>
  <div class="xs-item">
    <div class="xs-item__left">
      <div class="xs-item__left-title">{{ data.title }}</div>
      <div class="xs-item__left-user">
        <img :src="data.img" />

        <div class="xs-item__user-name">{{ data.User.username }}</div>
      </div>
      <div class="xs-item__left-desc">
        {{ data.content }}
      </div>
      <div class="xs-item__left-date">{{ data.createdAt }}</div>
    </div>

    <div class="xs-item__right">
      <img :src="data.img" />
    </div>
  </div>
</template>
